package tech.dx.springdb.respository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import tech.dx.springdb.entity.Parents;

/**
 * @ClassName ParentsRepository
 * @Description TODO
 * @Author daoxuan
 * @Date 2019/4/1 10:13
 * @Version 1.0
 */
public interface ParentsRepository extends JpaRepository<Parents,Long> {

    @Modifying
    @Query("update Parents p set p.status = '0' where p.id =  ?1 ")
    void changeStatus(long id);
}
